package main

import (
	"fmt"
	"github.com/360EntSecGroup-Skylar/excelize"
)

func main() {

	f, err := excelize.OpenFile("get_location/location.xlsx")
	if err != nil {
		fmt.Println(err)
		return
	}
	// 获取工作表中指定单元格的值
	str, er := f.GetRows("博士农场（15家）")
	if er != nil {
		fmt.Println(er)
		return
	}
	fmt.Println(str)
	cell, err := f.GetCellValue("博士农场（15家）", "D2")
	if err != nil {
		fmt.Println(err)
		return
	}
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(cell)

	//
	//url := "https://restapi.amap.com/v3/geocode/geo?key=5717ddaafb9cb8bbdf000565a4a2befc&city=310151&address=上海北湖有机农业示范基地"
	//resp,err := http.Get(url)
	//if err !=nil{
	//	fmt.Println("请求出错...")
	//	return
	//}
	//
	////
	//defer resp.Body.Close()
	//
	//body,err := ioutil.ReadAll(resp.Body)
	//fmt.Println(string(body))

}
